
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>数据处理 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="2.窗口函数.html" />
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    Hadoop
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../chapter1/1Hadoop.md">
            
                <span>
            
                    
                    Hadoop
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    HIVE
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.3.1" data-path="1.数据处理.html">
            
                <a href="1.数据处理.html">
            
                    
                    数据处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="2.窗口函数.html">
            
                <a href="2.窗口函数.html">
            
                    
                    窗口函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="3.Hive实战.html">
            
                <a href="3.Hive实战.html">
            
                    
                    Hive实战
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    Flume
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter3/1.Flume入门.md">
            
                <span>
            
                    
                    Flume入门与实践
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../chapter4/数据可视化.md">
            
                <span>
            
                    
                    数据可视化
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >数据处理</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="&#x7B2C;&#x4E00;&#x9898;">&#x7B2C;&#x4E00;&#x9898;</h3>
<p>&#x539F;&#x59CB;&#x6587;&#x672C;&#xFF1A;</p>
<pre><code class="lang-sql">    &#x5F20;&#x4F1F; 86-14870293148  \n
   &#x738B;&#x4F1F;   +86-13285654569    \n
    &#x738B;&#x82B3;        15856529115    \n
 &#x674E;&#x4F1F;         13022816340  \n
  &#x738B;&#x79C0;&#x82F1;   (86)14785720656     \n
   &#x674E;&#x79C0;&#x82F1;    17201444672    \n
    &#x674E;&#x5A1C;         15682812452     \n
    &#x5F20;&#x79C0;&#x82F1;         14326967740     \n
    &#x5218;&#x4F1F;  15146435743    \n
   &#x5F20;&#x654F;        (86)-17712576838   \n
    &#x674E;&#x9759;       86 14295083635  \n
    &#x5F20;&#x4E3D;     (+86) 13722348123   \n
   &#x738B;&#x9759;         17587918887   \n
  &#x738B;&#x4E3D;    15493106739    \n
 &#x674E;&#x5F3A;      13786842977   \n
 &#x5F20;&#x9759;         86-15542304386     \n
    &#x674E;&#x654F;         15642387356 \n
   &#x738B;&#x654F;          18627216756  \n
 &#x738B;&#x78CA;       17206185726   \n
    &#x674E;&#x519B;      17857426238     \n
   &#x5218;&#x6D0B;        17345352790     \n
</code></pre>
<p>1.&#x63D0;&#x53D6;&#x6240;&#x6709; 11 &#x4F4D;&#x6570;&#x5B57;&#x7535;&#x8BDD;&#x53F7;&#x7801;</p>
<p>2.&#x63D0;&#x53D6;&#x6240;&#x6709; 18 &#x6216; 13 &#x5F00;&#x5934;&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801;</p>
<p>3.&#x63D0;&#x53D6;&#x6240;&#x6709;&#x201C;&#x738B;&#x201D;&#x59D3;&#x540C;&#x5B66;&#x7684;&#x540D;&#x5B57;</p>
<p>4.&#x63D0;&#x53D6;&#x6240;&#x6709;&#x201C;&#x5F20;&#x201D;&#x59D3;&#x540C;&#x5B66;&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801; &#x683C;&#x5F0F;&#x4E3A; &#x5F20;XX&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801;&#x662F;&#xFF1A; XXXXXX</p>
<p>5.&#x91CD;&#x65B0;&#x6392;&#x7248;&#xFF0C;&#x6392;&#x7248;&#x6210;&#x7EDF;&#x4E00;&#x7684;&#x683C;&#x5F0F;&#xFF0C;&#x53BB;&#x6389;&#x56FD;&#x5BB6;&#x533A;&#x53F7;&#x3002;</p>
<h3 id="&#x7B2C;&#x4E8C;&#x9898;&#xFF1A;">&#x7B2C;&#x4E8C;&#x9898;&#xFF1A;</h3>
<p>&#x539F;&#x59CB;&#x6587;&#x672C;&#xFF1A;</p>
<pre><code class="lang-sql">  &#x5F20;&#x4F1F;         1996.8.24 
   &#x738B;&#x4F1F;      1993&#x5E74;10&#x6708;21&#x65E5;   
 &#x738B;&#x82B3;         1997-7-24   
   &#x674E;&#x4F1F;       1996.3.21  
   &#x738B;&#x79C0;&#x82F1;        1991.12.0  
   &#x674E;&#x79C0;&#x82F1;     1994-7-5    
   &#x674E;&#x5A1C;       1999.1.28   
   &#x5F20;&#x79C0;&#x82F1;        1998-2-24   &#x5218;&#x4F1F;     1996.5.28      &#x5F20;&#x654F;      1996.10.26   
  &#x674E;&#x9759;      1993&#x5E74;1&#x6708;6&#x65E5;    
   &#x5F20;&#x4E3D;        1992.5.21     &#x738B;&#x9759;  1998-5-1  
    &#x738B;&#x4E3D;   1994-4-14  
   &#x674E;&#x5F3A;  1993.8.13   
   &#x5F20;&#x9759;          1998&#x5E74;1&#x6708;5&#x65E5;   &#x674E;&#x654F;    1993-8-21  
   &#x738B;&#x654F;      1997-3-7    
   &#x738B;&#x78CA;     1999-3-18    
  &#x674E;&#x519B;         1990-12-18  
    &#x5218;&#x6D0B;   1995&#x5E74;5&#x6708;7&#x65E5;
</code></pre>
<ol>
<li>&#x63D0;&#x53D6;&#x6240;&#x6709;&#x65E5;&#x671F;</li>
<li>&#x63D0;&#x53D6;&#x6240;&#x6709; 1996 &#x5E74;&#x4EE5;&#x524D;&#x51FA;&#x751F;&#x7684;&#x5B66;&#x751F;</li>
<li>&#x91CD;&#x65B0;&#x6392;&#x7248; &#x8981;&#x6C42;&#x4EE5;&#xFF1A;&#x5F20;&#x4F1F;&#xFF1A; 1990 &#x5E74; 9 &#x6708; 15 &#x65E5; &#x683C;&#x5F0F;</li>
<li>&#x628A;&#x6240;&#x6709; 1996 &#x5E74;&#x4EE5;&#x524D;&#x51FA;&#x751F;&#x7684;&#x5B66;&#x751F;&#x51FA;&#x751F;&#x5E74;&#x4EFD;&#x6539;&#x4E3A; 1996 &#x5E76;&#x6392;&#x7248;</li>
<li>&#x63D0;&#x53D6;&#x751F;&#x65E5; &#x683C;&#x5F0F;&#xFF1A;&#x5F20;&#x4F1F;&#x7684;&#x751F;&#x65E5;&#x662F;11&#x6708;15&#x53F7;</li>
</ol>
<h3 id="&#x53C2;&#x8003;&#x7B54;&#x6848;">&#x53C2;&#x8003;&#x7B54;&#x6848;</h3>
<pre><code class="lang-python">str = <span class="hljs-string">&quot;&quot;&quot;
    &#x5F20;&#x4F1F; 86-14870293148  \n
   &#x738B;&#x4F1F;   +86-13285654569    \n
    &#x738B;&#x82B3;        15856529115    \n
 &#x674E;&#x4F1F;         13022816340  \n
  &#x738B;&#x79C0;&#x82F1;   (86)14785720656     \n
   &#x674E;&#x79C0;&#x82F1;    17201444672    \n
    &#x674E;&#x5A1C;         15682812452     \n
    &#x5F20;&#x79C0;&#x82F1;         14326967740     \n
    &#x5218;&#x4F1F;  15146435743    \n
   &#x5F20;&#x654F;        (86)-17712576838   \n
    &#x674E;&#x9759;       86 14295083635  \n
    &#x5F20;&#x4E3D;     (+86) 13722348123   \n
   &#x738B;&#x9759;         17587918887   \n
  &#x738B;&#x4E3D;    15493106739    \n
 &#x674E;&#x5F3A;      13786842977   \n
 &#x5F20;&#x9759;         86-15542304386     \n
    &#x674E;&#x654F;        15642387356 \n
   &#x738B;&#x654F;          18627216756  \n
 &#x738B;&#x78CA;       17206185726   \n
    &#x674E;&#x519B;      17857426238     \n
   &#x5218;&#x6D0B;        17345352790     \n
&quot;&quot;&quot;</span>

a = re.findall(<span class="hljs-string">r&apos;[\d]{11}&apos;</span>,str)
b = re.findall(<span class="hljs-string">r&apos;1[8|3][\d]{9}&apos;</span>,str)
c = re.findall(<span class="hljs-string">r&apos;&#x738B;\S*&apos;</span>,str)

d = re.findall(<span class="hljs-string">r&apos;(&#x5F20;\S*)\s+\(?(\+?86?)?\)?[ .-]?([\d]{11})&apos;</span>,str)

e = re.sub(<span class="hljs-string">r&apos;\s+(\w\S+)\s+\(?(\+?86?)?\)?[ .-]?([\d]{11})&apos;</span>,<span class="hljs-string">r&apos;\1  \3\n&apos;</span>,str)

print(a)
print(b)
print(c)
<span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> d:
    print(line[<span class="hljs-number">0</span>] + <span class="hljs-string">&quot;&#x7684;&#x7535;&#x8BDD;&#x53F7;&#x7801;&#x662F;&#xFF1A;&quot;</span> + line[<span class="hljs-number">2</span>])

print(e)
</code></pre>
<pre><code class="lang-python"><span class="hljs-comment">#&#x7B2C;&#x4E8C;&#x9898;</span>
<span class="hljs-comment"># &#x63D0;&#x53D6;&#x6240;&#x6709;&#x65E5;&#x671F;</span>
<span class="hljs-comment"># &#x63D0;&#x53D6;&#x6240;&#x6709; 1996 &#x5E74;&#x4EE5;&#x524D;&#x51FA;&#x751F;&#x7684;&#x5B66;&#x751F;</span>
<span class="hljs-comment"># &#x91CD;&#x65B0;&#x6392;&#x7248;</span>
<span class="hljs-comment"># &#x628A;&#x6240;&#x6709; 1996 &#x5E74;&#x4EE5;&#x524D;&#x51FA;&#x751F;&#x7684;&#x5B66;&#x751F;&#x51FA;&#x751F;&#x5E74;&#x4EFD;&#x6539;&#x4E3A; 1996</span>
<span class="hljs-comment"># &#x63D0;&#x53D6;&#x751F;&#x65E5; &#x683C;&#x5F0F;&#xFF1A;&#x5F20;&#x4F1F;&#x7684;&#x751F;&#x65E5;&#x662F;11&#x6708;15&#x53F7;</span>

str = <span class="hljs-string">&quot;&quot;&quot;
  &#x5F20;&#x4F1F;         1996.8.24 
   &#x738B;&#x4F1F;      1993&#x5E74;10&#x6708;21&#x65E5;   
 &#x738B;&#x82B3;         1997-7-24   
   &#x674E;&#x4F1F;       1996.3.21  
   &#x738B;&#x79C0;&#x82F1;        1991.12.0  
   &#x674E;&#x79C0;&#x82F1;     1994-7-5    
   &#x674E;&#x5A1C;       1999.1.28   
   &#x5F20;&#x79C0;&#x82F1;        1998-2-24   &#x5218;&#x4F1F;     1996.5.28      &#x5F20;&#x654F;      1996.10.26   
  &#x674E;&#x9759;      1993&#x5E74;1&#x6708;6&#x65E5;    
   &#x5F20;&#x4E3D;        1992.5.21     &#x738B;&#x9759;  1998-5-1  
    &#x738B;&#x4E3D;   1994-4-14  
   &#x674E;&#x5F3A;  1993.8.13   
   &#x5F20;&#x9759;          1998&#x5E74;1&#x6708;5&#x65E5;   &#x674E;&#x654F;    1993-8-21  
   &#x738B;&#x654F;      1997-3-7    
   &#x738B;&#x78CA;     1999-3-18    
  &#x674E;&#x519B;         1990-12-18  
    &#x5218;&#x6D0B;   1995&#x5E74;5&#x6708;7&#x65E5;  
&quot;&quot;&quot;</span>
a = re.findall(<span class="hljs-string">r&apos;\d{4}[&#x5E74;.-]?\d{1,2}[&#x6708;.-]?\d{1,2}\S?&apos;</span>,str)  <span class="hljs-comment"># &#x63D0;&#x53D6;&#x6240;&#x6709;&#x65E5;&#x671F;</span>
b = re.findall(<span class="hljs-string">r&apos;\S+\s+1\d{2}[0-5][&#x5E74;.-]?\d{1,2}[&#x6708;.-]?\d{1,2}\S?&apos;</span>,str)  <span class="hljs-comment"># &#x63D0;&#x53D6;&#x6240;&#x6709; 1996 &#x5E74;&#x4EE5;&#x524D;&#x51FA;&#x751F;&#x7684;&#x5B66;&#x751F;</span>
c = re.sub(<span class="hljs-string">r&apos;\s*(\S+)\s+(\d{4})[&#x5E74;.-]?(\d{1,2})[&#x6708;.-]?(\d{1,2})\S?&apos;</span>,<span class="hljs-string">r&apos;\1  \2 &#x5E74; \3 &#x6708; \4 &#x65E5; \n&apos;</span>,str)   <span class="hljs-comment">#&#x91CD;&#x65B0;&#x6392;&#x7248;</span>
d = re.findall(<span class="hljs-string">r&apos;(\S+)\s+(1\d{2}[0-6])\S?(\d{1,2})\S?(\d{1,2})\S?&apos;</span>,str)
e = re.findall(<span class="hljs-string">r&apos;(\S+)\s+\d{4}[&#x5E74;.-]?(\d{1,2})\S?(\d{1,2})\S?&apos;</span>,str)


print(a)  
print(<span class="hljs-string">&quot;\n&quot;</span>)
print(b)
print(<span class="hljs-string">&quot;\n&quot;</span>)
print(c)
<span class="hljs-keyword">for</span> line <span class="hljs-keyword">in</span> d:
    print(line[<span class="hljs-number">0</span>] + <span class="hljs-string">&quot;  &quot;</span> + <span class="hljs-string">&quot;1996&quot;</span> + <span class="hljs-string">&quot;&#x5E74;&quot;</span> + line[<span class="hljs-number">2</span>] + <span class="hljs-string">&quot;&#x6708;&quot;</span> + line[<span class="hljs-number">3</span>] + <span class="hljs-string">&quot;&#x65E5;&quot;</span> )

print(e)
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
                <a href="2.窗口函数.html" class="navigation navigation-next navigation-unique" aria-label="Next page: 窗口函数">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"数据处理","level":"1.3.1","depth":2,"next":{"title":"窗口函数","level":"1.3.2","depth":2,"path":"chapter2/2.窗口函数.md","ref":"chapter2/2.窗口函数.md","articles":[]},"previous":{"title":"HIVE","level":"1.3","depth":1,"ref":"","articles":[{"title":"数据处理","level":"1.3.1","depth":2,"path":"chapter2/1.数据处理.md","ref":"chapter2/1.数据处理.md","articles":[]},{"title":"窗口函数","level":"1.3.2","depth":2,"path":"chapter2/2.窗口函数.md","ref":"chapter2/2.窗口函数.md","articles":[]},{"title":"Hive实战","level":"1.3.3","depth":2,"path":"chapter2/3.Hive实战.md","ref":"chapter2/3.Hive实战.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"chapter2/1.数据处理.md","mtime":"2021-04-09T14:00:23.918Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-04-09T14:00:30.441Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

